package com.example.demo.services;

import com.example.demo.entity.userLogin;
import com.example.demo.mapper.userLoginMapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 分页测试
 */
@Service
public class test {

    @Autowired
    private userLoginMapper userLoginMapper;

    public PageInfo<userLogin> selectall(Integer size,Integer num){
        PageHelper.startPage(num,size);
        List<userLogin> test=userLoginMapper.selectall();
        PageInfo<userLogin> hello=new PageInfo<>(test);
        return hello;
    }
}
